<?

class tableController extends iMVC_Controller{


    public function index(){

        $tm=new testModel();
        $table=new iMVC_View_Table();
        //添加时列名不能为数字，为数字时array_merge会破坏键值
        $table->addCol('action',new iMVC_View_Table_Col_Action('修改'),100);
        $table->setCol('admin_id',new iMVC_View_Table_Col_CheckBox(),99);
        $table->hideCol('admin_role');
        $table->hideCol('admin__dt');
        $table->hideCol('disabled');
        $table->hideCol('admin_send_email');
        $table->setColOrder('admin_id',999);
        $table->setColName('admin_id','选择');
        $table->setColName('admin_is_virtual','可用性');
        $table->setColName('admin_reg_time','注册时间');
        $table->setColName('admin_login_times','登陆次数');
        $table->setColName('admin_lastlogin_time','上次登陆时间');
        $table->setColName('admin_lastlogin_ip','上次登陆ip');
        $table->setColName('admin_email','邮箱');
        $table->setColName('admin_uid','管理员账号');
        $table->setColName('action','操作');
        $table->generateTable($tm->fetchAll());

        $this->assign('table',$table);
        $this->display("table.tpl");
    
    }


}

// vim600:ts=4 st=4 foldmethod=marker foldmarker=<<<,>>>
// vim600:syn=php commentstring=//%s
